#include <cstdio>
#include <cstdlib>

#define NO_OF_CHARS 256
#define bool int

using namespace std;

char *removeDups(char *str)
{
	bool bin_hash[NO_OF_CHARS] = {0};
	int ip_ind = 0, res_ind = 0;
	char temp;

	while(*(str + ip_ind))
	{
		temp = (*(str + ip_ind));
                int h = temp;
                printf("--> %d\n", h);

		if(bin_hash[temp] == 0)
		{
			bin_hash[temp] = 1;
			*(str + res_ind) = *(str + ip_ind);
			res_ind++;
		}
		ip_ind++;
	}
	*(str + res_ind) = '\0';
	return str;
}

int main()
{
	char str[] = "geeksforgeeks";
	printf("%s", removeDups(str));
	getchar();
	return 0;
}
